import request from '@/utils/request'

// 封装区域管理列表渲染页面
export const getDistrictAPI = (params) => {
  return request.get('/parking/area/list', { params })
}
// 封装添加请求接口
export const updateDisAPI = (data) => {
  // return request.post('/parking/area')
  return request({
    url: '/parking/area',
    method: 'post',
    data: {
      areaName: data.areaName,
      spaceNumber: data.spaceNumber,
      areaProportion: data.areaProportion,
      ruleId: data.ruleId
    }
  })
}
// 封装编辑接口
export const editDisAPI = (data) => {
  return request.put('parking/area', data)
}
// 封装删除
export const delDisAPI = (id) => {
  return request.delete(`parking/area/${id}`)
}

